﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace CMS_Admin.Backend.Api.Migrations
{
    public partial class 迁移 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "ArticleClass",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ArticleClassName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ArticleClass", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "AuditInfo",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Parameters = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BrowserInfo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ClientName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ClientIpAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExecutionDuration = table.Column<int>(type: "int", nullable: false),
                    ExecutionTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ReturnValue = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Exception = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MethodName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ServiceName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UserInfo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CustomData = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AuditInfo", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Jurisdictions",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    JurisdictionName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Jurisdictions", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Roles",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    RoleName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Roles", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "websiteInfo",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Owner = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Introduce = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Phone = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Mailbox = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Url = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WebsiteICP = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PutOnRecords = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_websiteInfo", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "RolesJurisdiction",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    JurisdictionId = table.Column<int>(type: "int", nullable: false),
                    RolesId = table.Column<int>(type: "int", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RolesJurisdiction", x => x.Id);
                    table.ForeignKey(
                        name: "FK_RolesJurisdiction_Jurisdictions_JurisdictionId",
                        column: x => x.JurisdictionId,
                        principalTable: "Jurisdictions",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_RolesJurisdiction_Roles_RolesId",
                        column: x => x.RolesId,
                        principalTable: "Roles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "Users",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Nickname = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Username = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Password = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RolesId = table.Column<int>(type: "int", nullable: false),
                    Txcolor = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Bgcolor = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Users", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Users_Roles_RolesId",
                        column: x => x.RolesId,
                        principalTable: "Roles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "OtherInfo",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    InfoName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    InfoContent = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WebsiteInfoId = table.Column<int>(type: "int", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_OtherInfo", x => x.Id);
                    table.ForeignKey(
                        name: "FK_OtherInfo_websiteInfo_WebsiteInfoId",
                        column: x => x.WebsiteInfoId,
                        principalTable: "websiteInfo",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "Resource",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ResoutceName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WebsiteInfoId = table.Column<int>(type: "int", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Resource", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Resource_websiteInfo_WebsiteInfoId",
                        column: x => x.WebsiteInfoId,
                        principalTable: "websiteInfo",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "UserRoles",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    RoleId = table.Column<int>(type: "int", nullable: false),
                    RolesId = table.Column<int>(type: "int", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserRoles", x => x.Id);
                    table.ForeignKey(
                        name: "FK_UserRoles_Roles_RolesId",
                        column: x => x.RolesId,
                        principalTable: "Roles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_UserRoles_Users_UserId",
                        column: x => x.UserId,
                        principalTable: "Users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "Articles",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ArticleTitle = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Content = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ReadNumber = table.Column<int>(type: "int", nullable: false),
                    ThumbUpNumber = table.Column<int>(type: "int", nullable: false),
                    ArticleClassId = table.Column<int>(type: "int", nullable: false),
                    ResourceId = table.Column<int>(type: "int", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Articles", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Articles_ArticleClass_ArticleClassId",
                        column: x => x.ArticleClassId,
                        principalTable: "ArticleClass",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_Articles_Resource_ResourceId",
                        column: x => x.ResourceId,
                        principalTable: "Resource",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "UserArticles",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    ArticlesId = table.Column<int>(type: "int", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserArticles", x => x.Id);
                    table.ForeignKey(
                        name: "FK_UserArticles_Articles_ArticlesId",
                        column: x => x.ArticlesId,
                        principalTable: "Articles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_UserArticles_Users_UserId",
                        column: x => x.UserId,
                        principalTable: "Users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "Comments",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ArticlesId = table.Column<int>(type: "int", nullable: false),
                    CommentContent = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UsersId = table.Column<int>(type: "int", nullable: false),
                    UserArticlesId = table.Column<int>(type: "int", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Comments", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Comments_Articles_ArticlesId",
                        column: x => x.ArticlesId,
                        principalTable: "Articles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_Comments_UserArticles_UserArticlesId",
                        column: x => x.UserArticlesId,
                        principalTable: "UserArticles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_Comments_Users_UsersId",
                        column: x => x.UsersId,
                        principalTable: "Users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "Likes",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ArticlesId = table.Column<int>(type: "int", nullable: false),
                    UsersId = table.Column<int>(type: "int", nullable: false),
                    Liked = table.Column<bool>(type: "bit", nullable: false),
                    UserArticlesId = table.Column<int>(type: "int", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Likes", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Likes_Articles_ArticlesId",
                        column: x => x.ArticlesId,
                        principalTable: "Articles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_Likes_UserArticles_UserArticlesId",
                        column: x => x.UserArticlesId,
                        principalTable: "UserArticles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                    table.ForeignKey(
                        name: "FK_Likes_Users_UsersId",
                        column: x => x.UsersId,
                        principalTable: "Users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.InsertData(
                table: "ArticleClass",
                columns: new[] { "Id", "ArticleClassName", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, "新闻", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(6677), 0, true, false, "", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(6680) },
                    { 2, "热点", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(6894), 0, true, false, "", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(6897) }
                });

            migrationBuilder.InsertData(
                table: "Jurisdictions",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "JurisdictionName", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 6, 15, 17, 12, 776, DateTimeKind.Local).AddTicks(5234), 0, true, false, "无", "", new DateTime(2021, 8, 6, 15, 17, 12, 777, DateTimeKind.Local).AddTicks(6515) },
                    { 2, new DateTime(2021, 8, 6, 15, 17, 12, 777, DateTimeKind.Local).AddTicks(7608), 0, true, false, "所有权限", "", new DateTime(2021, 8, 6, 15, 17, 12, 777, DateTimeKind.Local).AddTicks(7612) },
                    { 3, new DateTime(2021, 8, 6, 15, 17, 12, 777, DateTimeKind.Local).AddTicks(7614), 0, true, false, "基本权限", "", new DateTime(2021, 8, 6, 15, 17, 12, 777, DateTimeKind.Local).AddTicks(7615) },
                    { 4, new DateTime(2021, 8, 6, 15, 17, 12, 777, DateTimeKind.Local).AddTicks(7617), 0, true, false, "用户权限", "", new DateTime(2021, 8, 6, 15, 17, 12, 777, DateTimeKind.Local).AddTicks(7617) },
                    { 5, new DateTime(2021, 8, 6, 15, 17, 12, 777, DateTimeKind.Local).AddTicks(7619), 0, true, false, "文章权限", "", new DateTime(2021, 8, 6, 15, 17, 12, 777, DateTimeKind.Local).AddTicks(7620) },
                    { 6, new DateTime(2021, 8, 6, 15, 17, 12, 777, DateTimeKind.Local).AddTicks(7621), 0, true, false, "角色权限", "", new DateTime(2021, 8, 6, 15, 17, 12, 777, DateTimeKind.Local).AddTicks(7622) },
                    { 7, new DateTime(2021, 8, 6, 15, 17, 12, 777, DateTimeKind.Local).AddTicks(7623), 0, true, false, "图片权限", "", new DateTime(2021, 8, 6, 15, 17, 12, 777, DateTimeKind.Local).AddTicks(7624) }
                });

            migrationBuilder.InsertData(
                table: "Resource",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "ResoutceName", "UpdatedTime", "WebsiteInfoId" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(7256), 0, true, false, "", "https://img1.baidu.com/it/u=3886212450,854269223&fm=26&fmt=auto&gp=0.jpg", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(7258), null },
                    { 2, new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(7461), 0, true, false, "", "https://img1.baidu.com/it/u=3044261220,3500389775&fm=26&fmt=auto&gp=0.jpg", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(7463), null }
                });

            migrationBuilder.InsertData(
                table: "Roles",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "RoleName", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(5201), 0, true, false, "", "普通用户", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(5206) },
                    { 2, new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(5476), 0, true, false, "", "管理员", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(5479) },
                    { 3, new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(5481), 0, true, false, "", "超级管理员", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(5482) }
                });

            migrationBuilder.InsertData(
                table: "websiteInfo",
                columns: new[] { "Id", "Address", "CreatedTime", "DisplayOrder", "Introduce", "IsActived", "IsDeleted", "Mailbox", "Owner", "Phone", "PutOnRecords", "Remarks", "UpdatedTime", "Url", "WebsiteICP" },
                values: new object[] { 1, "福建省龙岩市新罗区", new DateTime(2021, 8, 6, 15, 17, 12, 779, DateTimeKind.Local).AddTicks(376), 0, "就爱科技有限公司", true, false, "1254412212@qq.com", "xiaoai", "15270759789", "京公网安备44010602000207", "", new DateTime(2021, 8, 6, 15, 17, 12, 779, DateTimeKind.Local).AddTicks(380), "www.9ihub.com", "京ICP备12020869号-2" });

            migrationBuilder.InsertData(
                table: "OtherInfo",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "InfoContent", "InfoName", "IsActived", "IsDeleted", "Remarks", "UpdatedTime", "WebsiteInfoId" },
                values: new object[] { 1, new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(9374), 0, "http://dds", "微信url", true, false, "", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(9377), 1 });

            migrationBuilder.InsertData(
                table: "RolesJurisdiction",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "JurisdictionId", "Remarks", "RolesId", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(5886), 0, true, false, 1, "", 1, new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(5889) },
                    { 2, new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(6301), 0, true, false, 3, "", 2, new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(6304) },
                    { 3, new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(6306), 0, true, false, 2, "", 3, new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(6307) }
                });

            migrationBuilder.InsertData(
                table: "Users",
                columns: new[] { "Id", "Bgcolor", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Nickname", "Password", "Remarks", "RolesId", "Txcolor", "UpdatedTime", "Username" },
                values: new object[,]
                {
                    { 2, "blue", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(9009), 0, true, false, "嘿", "123456", "", 1, "white", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(9012), "xiaoai" },
                    { 1, "blue", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(7864), 0, true, false, "小可爱", "123456", "", 3, "white", new DateTime(2021, 8, 6, 15, 17, 12, 778, DateTimeKind.Local).AddTicks(7867), "xiaoyou" }
                });

            migrationBuilder.CreateIndex(
                name: "IX_Articles_ArticleClassId",
                table: "Articles",
                column: "ArticleClassId");

            migrationBuilder.CreateIndex(
                name: "IX_Articles_ResourceId",
                table: "Articles",
                column: "ResourceId");

            migrationBuilder.CreateIndex(
                name: "IX_Comments_ArticlesId",
                table: "Comments",
                column: "ArticlesId");

            migrationBuilder.CreateIndex(
                name: "IX_Comments_UserArticlesId",
                table: "Comments",
                column: "UserArticlesId");

            migrationBuilder.CreateIndex(
                name: "IX_Comments_UsersId",
                table: "Comments",
                column: "UsersId");

            migrationBuilder.CreateIndex(
                name: "IX_Likes_ArticlesId",
                table: "Likes",
                column: "ArticlesId");

            migrationBuilder.CreateIndex(
                name: "IX_Likes_UserArticlesId",
                table: "Likes",
                column: "UserArticlesId");

            migrationBuilder.CreateIndex(
                name: "IX_Likes_UsersId",
                table: "Likes",
                column: "UsersId");

            migrationBuilder.CreateIndex(
                name: "IX_OtherInfo_WebsiteInfoId",
                table: "OtherInfo",
                column: "WebsiteInfoId");

            migrationBuilder.CreateIndex(
                name: "IX_Resource_WebsiteInfoId",
                table: "Resource",
                column: "WebsiteInfoId");

            migrationBuilder.CreateIndex(
                name: "IX_RolesJurisdiction_JurisdictionId",
                table: "RolesJurisdiction",
                column: "JurisdictionId");

            migrationBuilder.CreateIndex(
                name: "IX_RolesJurisdiction_RolesId",
                table: "RolesJurisdiction",
                column: "RolesId");

            migrationBuilder.CreateIndex(
                name: "IX_UserArticles_ArticlesId",
                table: "UserArticles",
                column: "ArticlesId");

            migrationBuilder.CreateIndex(
                name: "IX_UserArticles_UserId",
                table: "UserArticles",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_UserRoles_RolesId",
                table: "UserRoles",
                column: "RolesId");

            migrationBuilder.CreateIndex(
                name: "IX_UserRoles_UserId",
                table: "UserRoles",
                column: "UserId");

            migrationBuilder.CreateIndex(
                name: "IX_Users_RolesId",
                table: "Users",
                column: "RolesId");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "AuditInfo");

            migrationBuilder.DropTable(
                name: "Comments");

            migrationBuilder.DropTable(
                name: "Likes");

            migrationBuilder.DropTable(
                name: "OtherInfo");

            migrationBuilder.DropTable(
                name: "RolesJurisdiction");

            migrationBuilder.DropTable(
                name: "UserRoles");

            migrationBuilder.DropTable(
                name: "UserArticles");

            migrationBuilder.DropTable(
                name: "Jurisdictions");

            migrationBuilder.DropTable(
                name: "Articles");

            migrationBuilder.DropTable(
                name: "Users");

            migrationBuilder.DropTable(
                name: "ArticleClass");

            migrationBuilder.DropTable(
                name: "Resource");

            migrationBuilder.DropTable(
                name: "Roles");

            migrationBuilder.DropTable(
                name: "websiteInfo");
        }
    }
}
